aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/[username]/(profile)/+layout.server.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-05 19:20:36 -0800
committerAdam Soltys <[email protected]>2024-12-05 19:20:36 -0800
commita9b44cbae79e9c01cff07964a45e1c7efa7fb241 (patch)
tree5caa996fc2eca705fb793e79d63bfbf5f9f93e48 /src/routes/(app)/[username]/(profile)/+layout.server.ts
parent6422ef30f14e1baf5d1995de69c777efcad77e32 (diff)
downloadcoinos-ui-a9b44cbae79e9c01cff07964a45e1c7efa7fb241.tar.gz
coinos-ui-a9b44cbae79e9c01cff07964a45e1c7efa7fb241.zip
cached rates
Diffstat (limited to 'src/routes/(app)/[username]/(profile)/+layout.server.ts')
-rw-r--r--src/routes/(app)/[username]/(profile)/+layout.server.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+layout.server.ts b/src/routes/(app)/[username]/(profile)/+layout.server.ts
index 0ed3edb8..70e7ebdb 100644
--- a/src/routes/(app)/[username]/(profile)/+layout.server.ts
+++ b/src/routes/(app)/[username]/(profile)/+layout.server.ts
@@ -1,8 +1,10 @@
+import getRates from "$lib/rates";
import { get } from "$lib/utils";
export async function load({ depends, parent }) {
depends("app:user");
+ const rates = await getRates();
const { subject, user } = await parent();
const { follows, followers } = await get(`/${subject.pubkey}/count`);
@@ -12,5 +14,5 @@ export async function load({ depends, parent }) {
() => [],
);
- return { follows, followers, followList };
+ return { follows, followers, followList, rate: rates[subject.currency] };
}